package lc_2697_字典序最小回文串;

public class Solution {

    public String makeSmallestPalindrome(String s) {
        char[] cs = s.toCharArray();
        int l = 0, r = s.length() - 1;
        while(l < r){
            if(cs[l] < cs[r]){
                cs[r] = cs[l];
            }else{
                cs[l] = cs[r];
            }
            l++;
            r--;
        }
        return new String(cs);
    }
}